package com.huayue.entity;

import java.util.Date;

import com.huayue.util.DateHelper;

/**
 * 员工
 * 
 */
public class Employee {
    private int id;
    private String realname;
    private String phone;
    private String password;
    private int sex;
    private Date birthday;
    private String address;
    private String idnumber;
    private int is_status;
    private String icon;

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    // 附加属性(外键)
    private int dep_id;
    private int role_id;

    public int getDep_id() {
        return dep_id;
    }

    public void setDep_id(int dep_id) {
        this.dep_id = dep_id;
    }

    public int getRole_id() {
        return role_id;
    }

    public void setRole_id(int role_id) {
        this.role_id = role_id;
    }

    public Employee() {}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {

        this.birthday = DateHelper.StringToDateShort(birthday);
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getIdnumber() {
        return idnumber;
    }

    public void setIdnumber(String idnumber) {
        this.idnumber = idnumber;
    }

    public int getIs_status() {
        return is_status;
    }

    public void setIs_status(int is_status) {
        this.is_status = is_status;
    }

    @Override
    public String toString() {
        return "Employee{" + "id=" + id + ", realname='" + realname + '\'' + ", phone='" + phone + '\'' + ", password='"
            + password + '\'' + ", sex=" + sex + ", birthday=" + birthday + ", address='" + address + '\''
            + ", idnumber='" + idnumber + '\'' + ", is_status=" + is_status + ", dep_id=" + dep_id + ", role_id="
            + role_id + '}';
    }
}
